object emr_f: Temr_f
  Left = 0
  Top = 0
  Caption = 'emr_f'
  ClientHeight = 537
  ClientWidth = 778
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  WindowState = wsMaximized
  PixelsPerInch = 96
  TextHeight = 13
  object JvNavPanelHeader1: TJvNavPanelHeader
    Left = 0
    Top = 0
    Width = 778
    Height = 33
    Align = alTop
    Caption = 'EMR'
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWhite
    Font.Height = -16
    Font.Name = 'Arial'
    Font.Style = [fsBold]
    ParentFont = False
    ImageIndex = 0
    ExplicitLeft = -225
    ExplicitWidth = 1003
  end
  object Panel_header: TPanel
    Left = 0
    Top = 33
    Width = 778
    Height = 34
    Align = alTop
    TabOrder = 1
    object cxLabel1: TcxLabel
      Left = 16
      Top = 6
      Caption = #3588#3657#3609#3627#3634' CID / '#3594#3639#3656#3629' / '#3609#3634#3617#3626#3585#3640#3621
    end
    object text_s: TcxTextEdit
      Left = 166
      Top = 6
      TabOrder = 1
      OnKeyUp = text_sKeyUp
      Width = 363
    end
    object RzBitBtn1: TRzBitBtn
      Left = 573
      Top = 6
      AllowAllUp = True
      Default = True
      Caption = #3588#3657#3609#3627#3634
      TabOrder = 2
      OnClick = RzBitBtn1Click
    end
    object cid_text: TcxLabel
      Left = 672
      Top = 6
      Caption = 'cid_text'
      Visible = False
    end
    object RzBitBtn4: TRzBitBtn
      Left = 535
      Top = 6
      Width = 33
      TabOrder = 4
      OnClick = RzBitBtn4Click
      Glyph.Data = {
        36060000424D3606000000000000360400002800000020000000100000000100
        08000000000000020000830E0000830E00000001000000000000000000003300
        00006600000099000000CC000000FF0000000033000033330000663300009933
        0000CC330000FF33000000660000336600006666000099660000CC660000FF66
        000000990000339900006699000099990000CC990000FF99000000CC000033CC
        000066CC000099CC0000CCCC0000FFCC000000FF000033FF000066FF000099FF
        0000CCFF0000FFFF000000003300330033006600330099003300CC003300FF00
        330000333300333333006633330099333300CC333300FF333300006633003366
        33006666330099663300CC663300FF6633000099330033993300669933009999
        3300CC993300FF99330000CC330033CC330066CC330099CC3300CCCC3300FFCC
        330000FF330033FF330066FF330099FF3300CCFF3300FFFF3300000066003300
        66006600660099006600CC006600FF0066000033660033336600663366009933
        6600CC336600FF33660000666600336666006666660099666600CC666600FF66
        660000996600339966006699660099996600CC996600FF99660000CC660033CC
        660066CC660099CC6600CCCC6600FFCC660000FF660033FF660066FF660099FF
        6600CCFF6600FFFF660000009900330099006600990099009900CC009900FF00
        990000339900333399006633990099339900CC339900FF339900006699003366
        99006666990099669900CC669900FF6699000099990033999900669999009999
        9900CC999900FF99990000CC990033CC990066CC990099CC9900CCCC9900FFCC
        990000FF990033FF990066FF990099FF9900CCFF9900FFFF99000000CC003300
        CC006600CC009900CC00CC00CC00FF00CC000033CC003333CC006633CC009933
        CC00CC33CC00FF33CC000066CC003366CC006666CC009966CC00CC66CC00FF66
        CC000099CC003399CC006699CC009999CC00CC99CC00FF99CC0000CCCC0033CC
        CC0066CCCC0099CCCC00CCCCCC00FFCCCC0000FFCC0033FFCC0066FFCC0099FF
        CC00CCFFCC00FFFFCC000000FF003300FF006600FF009900FF00CC00FF00FF00
        FF000033FF003333FF006633FF009933FF00CC33FF00FF33FF000066FF003366
        FF006666FF009966FF00CC66FF00FF66FF000099FF003399FF006699FF009999
        FF00CC99FF00FF99FF0000CCFF0033CCFF0066CCFF0099CCFF00CCCCFF00FFCC
        FF0000FFFF0033FFFF0066FFFF0099FFFF00CCFFFF00FFFFFF00000080000080
        000000808000800000008000800080800000C0C0C00080808000191919004C4C
        4C00B2B2B200E5E5E500C8AC2800E0CC6600F2EABF00B59B2400D8E9EC009933
        6600D075A300ECC6D900646F710099A8AC00E2EFF10000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000E8E8E8E8E8E8
        E8E8E8E8E8E8E8820982E8E8E8E8E8E8E8E8E8E8E8E8E8AC81ACE85E5E5E5E5E
        5E5E5E5E5E5E82090909E88181818181818181818181AC818181E85ED7D7D7D7
        D7D7D7D7D7DF09090982E881E8E8E8E8E8E8E8E8E8DF818181ACE85ED7E3E3E3
        E3E3DFDFDF09090982E8E881E8ACACACACACDFDFDF818181ACE8E85ED7D7D7D7
        E35DB3B3D7880982E8E8E881E8E8E8E8AC81E3E3D7E381ACE8E8E85ED7E3E3E3
        81E6B3B3B3D756E8E8E8E881E8ACACAC81E3E3E3E3D756E8E8E8E85ED7D7D7D7
        81E6D7E6B3B356E8E8E8E881E8E8E8E881E3D7E3E3E356E8E8E8E85ED7E3E3E3
        81E6D7D7E6B356E8E8E8E881E8ACACAC81E3D7D7E3E356E8E8E8E85ED7D7D7D7
        D781E6E6E65DDFE8E8E8E881E8E8E8E8E881E3E3E381DFE8E8E8E85ED7E3E3E3
        E3E3818181E35EE8E8E8E881E8ACACACACAC818181E381E8E8E8E85ED7D7D7D7
        D7D7D7D7D7D75EE8E8E8E881E8E8E8E8E8E8E8E8E8E881E8E8E8E85ED7E3E3E3
        E3E3D75E5E5E5EE8E8E8E881E8ACACACACACE881818181E8E8E8E85ED7D7D7D7
        D7D7D75EE35EE8E8E8E8E881E8E8E8E8E8E8E881E381E8E8E8E8E85ED7D7D7D7
        D7D7D75E5EE8E8E8E8E8E881E8E8E8E8E8E8E88181E8E8E8E8E8E85E5E5E5E5E
        5E5E5E5EE8E8E8E8E8E8E8818181818181818181E8E8E8E8E8E8E8E8E8E8E8E8
        E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8}
      NumGlyphs = 2
    end
  end
  object Panel2: TPanel
    Left = 0
    Top = 67
    Width = 199
    Height = 440
    Align = alLeft
    TabOrder = 2
    ExplicitTop = 166
    ExplicitHeight = 337
    object cxGrid: TcxGrid
      AlignWithMargins = True
      Left = 4
      Top = 4
      Width = 191
      Height = 432
      Align = alClient
      Font.Charset = THAI_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
      TabOrder = 0
      ExplicitHeight = 329
      object cxGridDBTableView1: TcxGridDBTableView
        Navigator.Buttons.CustomButtons = <>
        OnCellClick = cxGridDBTableView1CellClick
        OnCellDblClick = cxGridDBTableView1CellDblClick
        DataController.DataSource = Dvisit
        DataController.Summary.DefaultGroupSummaryItems = <>
        DataController.Summary.FooterSummaryItems = <>
        DataController.Summary.SummaryGroups = <>
        Filtering.ColumnFilteredItemsList = True
        OptionsData.CancelOnExit = False
        OptionsData.Deleting = False
        OptionsData.DeletingConfirmation = False
        OptionsData.Editing = False
        OptionsData.Inserting = False
        OptionsView.ColumnAutoWidth = True
        OptionsView.GroupByBox = False
        object cxGridDBTableView1HOSPCODE: TcxGridDBColumn
          DataBinding.FieldName = 'HOSPCODE'
        end
        object cxGridDBTableView1DATE_SERV: TcxGridDBColumn
          DataBinding.FieldName = 'DATE_SERV'
        end
      end
      object cxGridLevel1: TcxGridLevel
        GridView = cxGridDBTableView1
      end
    end
  end
  object Panel1: TPanel
    Left = 199
    Top = 67
    Width = 579
    Height = 440
    Align = alClient
    TabOrder = 3
    ExplicitTop = 166
    ExplicitWidth = 574
    ExplicitHeight = 337
    object show_visit: TcxGrid
      AlignWithMargins = True
      Left = 4
      Top = 4
      Width = 571
      Height = 432
      Align = alClient
      Font.Charset = THAI_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
      TabOrder = 0
      ExplicitWidth = 566
      ExplicitHeight = 329
      object show_visitDBTableView1: TcxGridDBTableView
        Navigator.Buttons.CustomButtons = <>
        OnCellDblClick = show_visitDBTableView1CellDblClick
        DataController.DataSource = DService
        DataController.Summary.DefaultGroupSummaryItems = <>
        DataController.Summary.FooterSummaryItems = <>
        DataController.Summary.SummaryGroups = <>
        Filtering.ColumnFilteredItemsList = True
        OptionsData.CancelOnExit = False
        OptionsData.Deleting = False
        OptionsData.DeletingConfirmation = False
        OptionsData.Editing = False
        OptionsData.Inserting = False
        OptionsView.ColumnAutoWidth = True
        OptionsView.GroupByBox = False
        object show_visitDBTableView1DATE_SERV: TcxGridDBColumn
          DataBinding.FieldName = 'DATE_SERV'
          Width = 87
        end
        object show_visitDBTableView1HOSPCODE: TcxGridDBColumn
          DataBinding.FieldName = 'HOSPCODE'
          Width = 82
        end
        object show_visitDBTableView1PID: TcxGridDBColumn
          DataBinding.FieldName = 'PID'
          Width = 28
        end
        object show_visitDBTableView1cid: TcxGridDBColumn
          DataBinding.FieldName = 'cid'
          Width = 24
        end
        object show_visitDBTableView1ptname: TcxGridDBColumn
          DataBinding.FieldName = 'ptname'
          Width = 63
        end
        object show_visitDBTableView1SBP: TcxGridDBColumn
          DataBinding.FieldName = 'SBP'
          Width = 33
        end
        object show_visitDBTableView1DBP: TcxGridDBColumn
          DataBinding.FieldName = 'DBP'
          Width = 46
        end
        object show_visitDBTableView1CHIEFCOMP: TcxGridDBColumn
          DataBinding.FieldName = 'CHIEFCOMP'
          Width = 201
        end
      end
      object show_visitLevel1: TcxGridLevel
        GridView = show_visitDBTableView1
      end
    end
  end
  object Panel3: TPanel
    Left = 0
    Top = 507
    Width = 778
    Height = 30
    Align = alBottom
    TabOrder = 4
    ExplicitTop = 503
    ExplicitWidth = 773
    DesignSize = (
      778
      30)
    object RzBitBtn2: TRzBitBtn
      Left = 699
      Top = 2
      Anchors = [akRight, akBottom]
      Caption = 'Exit'
      TabOrder = 0
      OnClick = RzBitBtn2Click
      Glyph.Data = {
        36060000424D3606000000000000360400002800000020000000100000000100
        08000000000000020000730B0000730B00000001000000000000000000003300
        00006600000099000000CC000000FF0000000033000033330000663300009933
        0000CC330000FF33000000660000336600006666000099660000CC660000FF66
        000000990000339900006699000099990000CC990000FF99000000CC000033CC
        000066CC000099CC0000CCCC0000FFCC000000FF000033FF000066FF000099FF
        0000CCFF0000FFFF000000003300330033006600330099003300CC003300FF00
        330000333300333333006633330099333300CC333300FF333300006633003366
        33006666330099663300CC663300FF6633000099330033993300669933009999
        3300CC993300FF99330000CC330033CC330066CC330099CC3300CCCC3300FFCC
        330000FF330033FF330066FF330099FF3300CCFF3300FFFF3300000066003300
        66006600660099006600CC006600FF0066000033660033336600663366009933
        6600CC336600FF33660000666600336666006666660099666600CC666600FF66
        660000996600339966006699660099996600CC996600FF99660000CC660033CC
        660066CC660099CC6600CCCC6600FFCC660000FF660033FF660066FF660099FF
        6600CCFF6600FFFF660000009900330099006600990099009900CC009900FF00
        990000339900333399006633990099339900CC339900FF339900006699003366
        99006666990099669900CC669900FF6699000099990033999900669999009999
        9900CC999900FF99990000CC990033CC990066CC990099CC9900CCCC9900FFCC
        990000FF990033FF990066FF990099FF9900CCFF9900FFFF99000000CC003300
        CC006600CC009900CC00CC00CC00FF00CC000033CC003333CC006633CC009933
        CC00CC33CC00FF33CC000066CC003366CC006666CC009966CC00CC66CC00FF66
        CC000099CC003399CC006699CC009999CC00CC99CC00FF99CC0000CCCC0033CC
        CC0066CCCC0099CCCC00CCCCCC00FFCCCC0000FFCC0033FFCC0066FFCC0099FF
        CC00CCFFCC00FFFFCC000000FF003300FF006600FF009900FF00CC00FF00FF00
        FF000033FF003333FF006633FF009933FF00CC33FF00FF33FF000066FF003366
        FF006666FF009966FF00CC66FF00FF66FF000099FF003399FF006699FF009999
        FF00CC99FF00FF99FF0000CCFF0033CCFF0066CCFF0099CCFF00CCCCFF00FFCC
        FF0000FFFF0033FFFF0066FFFF0099FFFF00CCFFFF00FFFFFF00000080000080
        000000808000800000008000800080800000C0C0C00080808000191919004C4C
        4C00B2B2B200E5E5E500C8AC2800E0CC6600F2EABF00B59B2400D8E9EC009933
        6600D075A300ECC6D900646F710099A8AC00E2EFF10000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000E8E8E8E8E8E8
        EEE8E8E8E8E8E8E8E8E8E8E8E8E8E8E8EEE8E8E8E8E8E8E8E8E8E8E8E8EEE3AC
        E3EEE8E8E8E8E8E8E8E8E8E8E8EEE8ACE3EEE8E8E8E8E8E8E8E8E8EEE3E28257
        57E2ACE3EEE8E8E8E8E8E8EEE8E2818181E2ACE8EEE8E8E8E8E8E382578282D7
        578181E2E3E8E8E8E8E8E881818181D7818181E2E8E8E8E8E8E857828989ADD7
        57797979EEE8E8E8E8E88181DEDEACD781818181EEE8E8E8E8E857898989ADD7
        57AAAAA2D7ADE8E8E8E881DEDEDEACD781DEDE81D7ACE8E8E8E857898989ADD7
        57AACEA3AD10E8E8E8E881DEDEDEACD781DEAC81AC81E8E8E8E85789825EADD7
        57ABCFE21110E8E8E8E881DE8181ACD781ACACE28181E8E8E8E8578957D7ADD7
        57ABDE101010101010E881DE56D7ACD781ACDE818181818181E857898257ADD7
        57E810101010101010E881DE8156ACD781E381818181818181E857898989ADD7
        57E882101010101010E881DEDEDEACD781E381818181818181E857898989ADD7
        57ACEE821110E8E8E8E881DEDEDEACD781ACEE818181E8E8E8E857898989ADD7
        57ABE8AB8910E8E8E8E881DEDEDEACD781ACE3ACDE81E8E8E8E857828989ADD7
        57ACE8A3E889E8E8E8E88181DEDEACD781ACE381E8DEE8E8E8E8E8DE5E8288D7
        57A2A2A2E8E8E8E8E8E8E8DE8181DED781818181E8E8E8E8E8E8E8E8E8AC8257
        57E8E8E8E8E8E8E8E8E8E8E8E8AC818181E8E8E8E8E8E8E8E8E8}
      NumGlyphs = 2
      ExplicitLeft = 694
    end
    object RzBitBtn3: TRzBitBtn
      Left = 618
      Top = 2
      Anchors = [akRight, akBottom]
      Caption = 'EMR'
      TabOrder = 1
      OnClick = RzBitBtn3Click
      Glyph.Data = {
        36060000424D3606000000000000360400002800000020000000100000000100
        08000000000000020000520B0000520B00000001000000000000000000003300
        00006600000099000000CC000000FF0000000033000033330000663300009933
        0000CC330000FF33000000660000336600006666000099660000CC660000FF66
        000000990000339900006699000099990000CC990000FF99000000CC000033CC
        000066CC000099CC0000CCCC0000FFCC000000FF000033FF000066FF000099FF
        0000CCFF0000FFFF000000003300330033006600330099003300CC003300FF00
        330000333300333333006633330099333300CC333300FF333300006633003366
        33006666330099663300CC663300FF6633000099330033993300669933009999
        3300CC993300FF99330000CC330033CC330066CC330099CC3300CCCC3300FFCC
        330000FF330033FF330066FF330099FF3300CCFF3300FFFF3300000066003300
        66006600660099006600CC006600FF0066000033660033336600663366009933
        6600CC336600FF33660000666600336666006666660099666600CC666600FF66
        660000996600339966006699660099996600CC996600FF99660000CC660033CC
        660066CC660099CC6600CCCC6600FFCC660000FF660033FF660066FF660099FF
        6600CCFF6600FFFF660000009900330099006600990099009900CC009900FF00
        990000339900333399006633990099339900CC339900FF339900006699003366
        99006666990099669900CC669900FF6699000099990033999900669999009999
        9900CC999900FF99990000CC990033CC990066CC990099CC9900CCCC9900FFCC
        990000FF990033FF990066FF990099FF9900CCFF9900FFFF99000000CC003300
        CC006600CC009900CC00CC00CC00FF00CC000033CC003333CC006633CC009933
        CC00CC33CC00FF33CC000066CC003366CC006666CC009966CC00CC66CC00FF66
        CC000099CC003399CC006699CC009999CC00CC99CC00FF99CC0000CCCC0033CC
        CC0066CCCC0099CCCC00CCCCCC00FFCCCC0000FFCC0033FFCC0066FFCC0099FF
        CC00CCFFCC00FFFFCC000000FF003300FF006600FF009900FF00CC00FF00FF00
        FF000033FF003333FF006633FF009933FF00CC33FF00FF33FF000066FF003366
        FF006666FF009966FF00CC66FF00FF66FF000099FF003399FF006699FF009999
        FF00CC99FF00FF99FF0000CCFF0033CCFF0066CCFF0099CCFF00CCCCFF00FFCC
        FF0000FFFF0033FFFF0066FFFF0099FFFF00CCFFFF00FFFFFF00000080000080
        000000808000800000008000800080800000C0C0C00080808000191919004C4C
        4C00B2B2B200E5E5E500C8AC2800E0CC6600F2EABF00B59B2400D8E9EC009933
        6600D075A300ECC6D900646F710099A8AC00E2EFF10000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000E85858585858
        5858585858585858E8E8E881818181818181818181818181E8E8E858ADADD7D7
        D7D7D7D7D7D7D7D758E8E881ACACE8E8E8E8E8E8E8E8E8E881E8E858ADADD7AD
        ADADADADADADADD758E8E881ACACE8ACACACACACACACACE881E8E85858ADD7D7
        D7D7D7D7D7D7D7D758E8E88181ACE8E8E8E8E8E8E8E8E8E881E8E858ADADD7AD
        ADADADADADADADD758E8E881ACACE8ACACACACACACACACE881E8E858ADADD7D7
        D7D7D7D7D7D7D7D758E8E881ACACE8E8E8E8E8E8E8E8E8E881E8E858ADADD7AD
        ADADADADADADADD758E8E881ACACE8ACACACACACACACACE881E8E858ADADD7D7
        D7D7D7D7D7D7D7D758E8E881ACACE8E8E8E8E8E8E8E8E8E881E8E85858ADD7D7
        D76CD7D06C6CD0D758E8E88181ACE8E8E881E8AC8181ACE881E8E858ADADD7D7
        D76CD76CD7D76CD758E8E881ACACE8E8E881E881E8E881E881E8E858ADADD7D7
        D76CD7D7D7D76CD758E8E881ACACE8E8E881E8E8E8E881E881E8E858ADADD7D7
        D76CD76C6C6CD0D758E8E881ACACE8E8E881E8818181ACE881E8E858ADADD7D7
        6C6CD76CD7D7D7D758E8E881ACACE8E88181E881E8E8E8E881E8E85858ADD7D7
        D76CD76C6C6C6CD758E8E88181ACE8E8E881E881818181E881E8E858ADADD7D7
        D7D7D7D7D7D7D7D758E8E881ACACE8E8E8E8E8E8E8E8E8E881E8E85858585858
        5858585858585858E8E8E881818181818181818181818181E8E8}
      NumGlyphs = 2
      ExplicitLeft = 613
    end
  end
  object Dvisit: TMyDataSource
    DataSet = Qvisit
    Left = 88
    Top = 264
  end
  object Qvisit: TMyQuery
    Connection = DataModule1.connect_db
    SQL.Strings = (
      'SELECT c.*'
      'from person p '
      'LEFT OUTER JOIN '
      
        '(SELECT s.HOSPCODE,s.PID,s.DATE_SERV,s.SEQ,p.cid,CONCAT(pe.prena' +
        'me,'#39' '#39',p.`NAME`,'#39' '#39',p.LNAME) as ptname'
      ',s.SBP,s.DBP,s.CHIEFCOMP'
      'FROM service s '
      
        'LEFT OUTER JOIN person p ON p.HOSPCODE = s.HOSPCODE AND p.PID = ' +
        's.PID'
      'LEFT OUTER JOIN cprename pe ON pe.id_prename = p.PRENAME'
      ''
      ')c ON c.cid = p.cid '
      ' '
      '#WHERE c.cid = '#39'3580400329808'#39
      'WHERE c.cid = :cid'
      ''
      'GROUP BY c.hospcode,c.pid,c.SEQ'
      ''
      'ORDER BY c.DATE_SERV desc'
      ''
      'limit 100;')
    Left = 88
    Top = 208
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'cid'
      end>
  end
  object QService: TMyQuery
    Connection = DataModule1.connect_db
    SQL.Strings = (
      'SELECT c.* '
      'from person p '
      'LEFT OUTER JOIN '
      
        '(SELECT s.HOSPCODE,s.PID,s.DATE_SERV,s.SEQ,p.cid,CONCAT(pe.prena' +
        'me,'#39' '#39',p.`NAME`,'#39' '#39',p.LNAME) as ptname'
      ',s.SBP,s.DBP,s.CHIEFCOMP'
      'FROM service s '
      
        'LEFT OUTER JOIN person p ON p.HOSPCODE = s.HOSPCODE AND p.PID = ' +
        's.PID'
      'LEFT OUTER JOIN cprename pe ON pe.id_prename = p.PRENAME'
      ''
      ')c ON c.cid = p.cid '
      ' '
      '#WHERE c.cid = '#39'3580400329808'#39
      'WHERE c.hospcode = :hospcode'
      'AND c.SEQ = :seq'
      ''
      'GROUP BY c.hospcode,c.pid,c.SEQ'
      ''
      'ORDER BY c.DATE_SERV desc'
      ''
      'limit 100;')
    ReadOnly = True
    Left = 392
    Top = 208
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'hospcode'
      end
      item
        DataType = ftUnknown
        Name = 'seq'
      end>
  end
  object DService: TMyDataSource
    DataSet = QService
    Left = 448
    Top = 208
  end
end
